From: Karl Heuer Date: Fri, 8 Apr 1994 05:59:03 +0000 (+0000) Subject: (kbd_buffer_get_event): Make buffer_switch_event lispy. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~92313 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=a8015ab5ed668ed690837fd5f9c593c5e8e19b94;p=emacs.git (kbd_buffer_get_event): Make buffer_switch_event lispy. (record_asynch_buffer_change): New function. Enqueue the event. --- diff --git a/src/keyboard.c b/src/keyboard.c index f09b7fadbc2..dcda52ba441 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2008,6 +2008,12 @@ kbd_buffer_get_event () kbd_fetch_ptr = event + 1; } #endif + else if (event->kind == buffer_switch_event) + { + /* The value doesn't matter here; only the type is tested. */ + XSET (obj, Lisp_Buffer, current_buffer); + kbd_fetch_ptr = event + 1; + } /* Just discard these, by returning nil. (They shouldn't be found in the buffer, but on some machines it appears they do show up.) */ @@ -3250,6 +3256,14 @@ gobble_input (expected) read_avail_input (expected); #endif } + +record_asynch_buffer_change () +{ + struct input_event event; + event.kind = buffer_switch_event; + event.frame_or_window = Qnil; + kbd_buffer_store_event (&event); +} #ifndef VMS